package br.com.drestranho.escola.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="chamada", schema="public")
public class Chamada implements Serializable {
	@Id
	@SequenceGenerator(name="seq_chamada", sequenceName="seq_chamada", allocationSize=1)
	@GeneratedValue(generator="seq_chamada", strategy=GenerationType.SEQUENCE)
	@Column(name="id")
	Integer id;
	@ManyToOne
    @JoinColumn(name="id_disciplina", referencedColumnName="id")
    Disciplina disciplina;
	@Column(name="data")
	Date data;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Disciplina getDisciplina() {
		return disciplina;
	}
	public void setDisciplina(Disciplina disciplina) {
		this.disciplina = disciplina;
	}
	public Date getData() {
		return data;
	}
	public void setData(Date data) {
		this.data = data;
	}
	
}
